using Framework.Save;
using LitJson;
using UnityEngine;

namespace GameCore
{
    public abstract class Sector : ManagedPrefab, IJsonSerializable
    {
        public AreaConfig area;
        public Region region;

        public Transform itemRoot;

        protected void PlaceWorldItem(WorldItem item, float x, float y)
        {
            item.transform.parent = itemRoot;
            item.transform.position = new Vector3(x, y, 0);
        }

        public abstract JsonData Serialize();
        public abstract void Deserialize(JsonData json);
    }
}